//
//  JPNetWorkService.h
//  GrainAndOil
//
//  Created by xiangming on 14-7-9.
//  Copyright (c) 2014年 JunePartner. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Request.h"

@interface NetWorkService : NSObject

//获取数据
+ (Request *)byRequestWithAPIPrefix:(NSString *)prefix
                         andAPISuffix:(NSString *)suffix
                        andHttpMethod:(NSString *)httpMethod
                        andParameters:(NSMutableDictionary *)params
                      andRequestCache:(BOOL)requestCache
                       andUseParamDic:(BOOL)useParamDic
                andRequestFinishBlock:(BYRequestFinishBlock)finishBlock;

//带参数编码格式请求数据
+ (Request *)byRequestWithAPIPrefix:(NSString *)prefix
                       andAPISuffix:(NSString *)suffix
                      andHttpMethod:(NSString *)httpMethod
                      andParameters:(NSMutableDictionary *)params
                    andRequestCache:(BOOL)requestCache
                     andUseParamDic:(BOOL)useParamDic
                andPostDataEncoding:(MKNKPostDataEncodingType)encoding
              andRequestFinishBlock:(BYRequestFinishBlock)finishBlock;

//上传文件
+ (Request *)byRequestWithAPIPrefix:(NSString *)prefix
                         andAPISuffix:(NSString *)suffix
                        andHttpMethod:(NSString *)httpMethod
                        andParameters:(NSMutableDictionary *)params
                      andRequestCache:(BOOL)requestCache
                       andUseParamDic:(BOOL)useParamDic
                          andFileData:(NSData *)fileData
                           andFileKey:(NSString *)fileKey
                andRequestFinishBlock:(BYRequestFinishBlock)finishBlock;

+ (Request *)byRequestWithAPIPrefix:(NSString *)prefix
                         andAPISuffix:(NSString *)suffix
                        andHttpMethod:(NSString *)httpMethod
                        andParameters:(NSMutableDictionary *)params
                      andRequestCache:(BOOL)requestCache
                       andUseParamDic:(BOOL)useParamDic
                          andFilePath:(NSString *)filePath
                           andFileKey:(NSString *)fileKey
                andRequestFinishBlock:(BYRequestFinishBlock)finishBlock;

//判断网络状态
+ (NetworkStatus)networkStatus;

@end
